<?php TPL::output('global/header.tpl.htm'); ?>

<div class="i_bd mainElem i_clear"> 
	<h4 class="latest_trendst_h3 topic_details"><a class="i_gray_but i_right" href="topic/<?php echo $this->topic_info['url_token']; ?>">返回详述 »</a>标签编辑</h4>
	<form id="topic_form" action="topic/ajax/edit_topic/" method="post" onsubmit="return false">
	<input type="hidden" name="topic_id" value="<?php echo $this->topic_info['topic_id']; ?>" />
	<div class="i_left L_sidebar i_bgNo">
		<div class="t_topic_index i_prl q_congMain b_x4 t_topic_edit">
			<h3 class="t_topad">
				<p class="topic_titleInput"><span style="font-size:20px;color:#17344A !important;"><b><?php echo $this->topic_info['topic_title']; ?></b></span>
				<!--input type="text" name="topic_title" class="i_glotxtClass" style="width:460px;" onFocus="$.focus(this,'');" value="<?php echo $this->topic_info['topic_title']; ?>" /--></p>				
                <div class="topic_related i_prl t_reTopic"><b class="i_pas x2">相关标签：</b>
                    <span id="i_PublicTopic" class="t_topic_rx">
                    <?php if ($this->related_topics) { ?>
                        <?php foreach($this->related_topics as $key => $val){ ?>
                        <a href="topic/<?php echo $val['url_token']; ?>" class="i_glotopic user_msg" data-message="&uid=<?php echo $val['topic_id']; ?>&card=topic"><?php echo $val['topic_title']; ?></a>
                        <?php } ?>
                    <?php } ?> 
                    </span>
                    <?php if ($this->user_info['permission']['is_administortar'] OR $this->user_info['permission']['is_moderator'] OR ($this->topic_info['topic_lock'] == 0 && $this->user_info['permission']['edit_topic'])) { ?>
                    <span id="editor_topicBtns" onclick="$.editor_topic_x(this);" title="标签编辑" class="q_editor i_small">标签编辑</span>
                    <div class="editor_input i_hide rightSide " id="editor_input_handle" style="text-align:left;">
                    <p style="padding:5px 0; color:red; text-align:left;" id="tips_err"></p>
                    <input type="text" style="width:250px;" class="i_glotxtClass" value="创建添加相关标签..." onKeyUp="$('#tips_err').hide();"  onfocus="$.focus(this,'创建添加相关标签...');" maxlength="13" id="editor_input" >&nbsp;&nbsp;<a onclick="$.establish_topicx();" title="确定添加»" href="javascript:;" class="i_green_bt2">添加»</a>&nbsp;&nbsp;<a href="javascript:;" onClick="$.exit_topic();" class="i_gray_bt2">取消</a>
	   </div>
	   <?php } ?>
    </div>
			</h3>
			<!-- -- 图片上传  BEGIN  -->
			<p class="u_topicHead i_pas" >
				<img id="topic_pic" src="<?php echo get_topic_pic_url('max', $this->topic_info['topic_pic']);?>" class="i_radiu5" alt="<?php echo $this->topic_info['topic_title']; ?>" title="<?php echo $this->topic_info['topic_title']; ?>"/>
				<?php if ($this->user_info['permission']['is_administortar'] OR $this->user_info['permission']['is_moderator'] OR ($this->topic_info['topic_lock'] == 0 && $this->user_info['permission']['edit_topic'])) { ?><span title="编辑" class="q_editor i_small i_radiu3" id="topic_pic_uploader">编辑</span><?php } ?>
				
				<span id="uploading_status" style="display:none"><img src="<?php echo G_STATIC_URL; ?>/common/load.gif" align="absmiddle"></span>
			</p>
			
			<!-- -- 图片上传  END  -->
		</div>
		
		<div class="t_topicTxtCon a_question">
			<div class="a_qsReplenish " id="topic_container">
				<textarea name="topic_description" onfocus="$.focus(this,'针对上面的站点进行补充说明...',$.Q.replenish(this));" class="i_glotxtClass a_qstxt i_txtHeight advanced_editor" ><?php echo $this->topic_info['topic_description']; ?></textarea>
				
				<div class="t_topad i_tr" id="markItUpBtn" style="padding-top:20px;">
					<a href="javascript:;" title="完成" onclick="ajax_post($('#topic_form'));" class="i_replay_but2">完成</a>
				</div>
			</div>
		</div>
	</div>
	</form>
	
	<div class="R_sidebar"> 
		<div class="i_rightMain">
			<div class="interest_user t_topicpad">
              <h3>标签编辑指南</h3>
              <div class="a_contxt">
                <p><b>● 相关标签：</b> 添加和该标签词义相近或者相似的标签</p>
                <p><b>● 标签内容：</b> 标签是Anwsion系统用来组织内容的一个节点，也是根据内容提炼出来的知识点。标签是构成Anwsion系统讨论内容的基本单元，是对各种事物、现象等概念的解释。如果您针对本标签的定义非常清晰，请帮忙完善该标签并帮助社区用户对该标签的理解。谢谢您的分享和贡献！</p>
              </div>
            </div>
		</div>
	</div>
</div>


<script type="text/javascript">
	var TOPIC_ID = '<?php echo $this->topic_info['topic_id']; ?>';	
</script>

<script type="text/javascript" src="<?php echo G_STATIC_URL; ?>/js/app/topic.js"></script>

<?php TPL::output('global/footer.tpl.htm'); ?>